package edu.ustb.service;
import java.util.List;

import edu.ustb.domain.Address;
import edu.ustb.domain.Cart;
import edu.ustb.mapper.AddressMapper;
import edu.ustb.mapper.CartMapper;
import edu.ustb.utils.MybatisUtil;

import java.util.List;

import org.apache.ibatis.session.SqlSession;



public class AddressServiceImpl implements AddressService {

	@Override
	public List<Address> getAddress(int uid) {
		try{
			SqlSession openSession = MybatisUtil.open();
			AddressMapper mapper = openSession.getMapper(AddressMapper.class);		
			List<Address> plist = mapper.getAddress(uid);
			return plist;
		}catch (Exception e) {		
			e.printStackTrace();
			return null;		
		}
	}

}
